package cn.com.se.设计模式.单例模式;

public class SingleTest {

    /**
     * 单例模式测试
     *
     * @param args
     */
    public static void main(String[] args) {
        // 懒汉单例测试
        Single1 single1 = Single1.test();
        single1.print();

        // 饿汉单例
        Single2 single2 = Single2.test();
        single2.print();
    }
}
